package com.codebattery.controller;


import com.codebattery.domain.model.MenuInfo;
import com.codebattery.domain.model.NodeInfo;
import com.codebattery.service.MenuService;
import com.codebattery.service.NodeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api("功能节点接口")
@RestController
@RequestMapping(value="node")
public class NodeController {

    private static final Logger logger = LoggerFactory.getLogger(NodeController.class);

    @Autowired
    private NodeService nodeService;

    @ApiOperation(value="获取功能节点",notes="获取功能节点")
    @RequestMapping(value="",method = RequestMethod.POST)
    @ResponseBody
    public NodeInfo list() {
        logger.debug("获取功能节点");

        return nodeService.list(null);
    }

}
